-- GENERATED SPELL FOR [Greyheart Shield-Bearer] --


function spell0_21231(pUnit, Event) --@Avenger\'s Shield,n/a--
pUnit:FullCastSpellOnTarget(38631,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21231', 6347, 1)
end

function spell1_21231(pUnit, Event) --@Shield Charge,n/a--
pUnit:FullCastSpellOnTarget(38630,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21231', 632, 1)
end

function Sorts_21231(pUnit, Event)
local choix_sorts_21231 = math.random(0, 1)
if choix_sorts_21231 == 0 then
pUnit:RegisterEvent('spell0_21231', 1, 1)
end
if choix_sorts_21231 == 1 then
pUnit:RegisterEvent('spell1_21231', 1, 1)
end
end

function mob21231_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_21231', math.random(1500, 3000), 1)
end

function mob21231_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21231_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21231_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(21231, 1, 'mob21231_Action')
RegisterUnitEvent(21231, 2, 'mob21231_Leave')
RegisterUnitEvent(21231, 3, 'mob21231_Kill')
RegisterUnitEvent(21231, 4, 'mob21231_Die')
